package entity

import (
	"time"

	"gorm.io/gorm"
	"shqsoft.cn/pas3ui/base"
)

//CompAccoFlowCh
type CompAccoFlowCh struct {
	ACID   int       `gorm:"column:ACID;primary_key;"`
	CUNM   string    `gorm:"column:CUNM"`
	UTNM   string    `gorm:"column:UTNM"`
	ITNM   string    `gorm:"column:ITNM"`
	OPDT   time.Time `gorm:"column:OPDT"`
	ACNO   string    `gorm:"column:ACNO"`
	BANO   string    `gorm:"column:BANO"`
	ISDIVI int       `gorm:"column:ISDIVI"`
}

//TableName
func (CompAccoFlowCh) TableName() string {
	return "V_COMP_ACCO_FLOW"
}

// AfterFind 查询后触发器
func (i *CompAccoFlowCh) AfterFind(tx *gorm.DB) (err error) {
	i.ACNO = base.CdnoTM(i.ACNO)
	i.BANO = base.AcnoTM(i.BANO)
	return
}
func CompAccoFlowChEF() base.EntityFunc {
	return func() interface{} {
		entity := CompAccoFlowCh{}
		return &entity
	}
}
func CompAccoFlowChESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []CompAccoFlowCh
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("CompAccoFlowCh", base.NewDefaultDao(CompAccoFlowChEF(), CompAccoFlowChESF(), nil, "ch"))
}
